package day12;

public class Disk {
    private int amount;
    private String type;//盘符
    private int size;
    int count = 0;
    SoftWare[] softWares = new SoftWare[50];

    public Disk() {
    }

    public Disk(int amount, String type, int size) {
        this.amount = amount;
        this.type = type;
        this.size = size;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    //
    public void install(SoftWare f) {
        softWares[count] = f;
        count++;
    }
    public void show2(){
        for (int i = 0; i < count; i++) {
            System.out.println("软件名称："+softWares[i].getName()+"软件大小:"+softWares[i].getSize()+"M");
        }
    }
}
